<div id="content">
	<div class="row s_page_title" *ngIf="pageType ==='new'">
		<sa-big-breadcrumbs [items]="['系统基础管理','角色管理','新增角色']" icon="fa fa-list" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="row s_page_title" *ngIf="pageType ==='updata'">
		<sa-big-breadcrumbs [items]="['系统基础管理','角色管理','编辑角色']" icon="fa fa-list" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="s_page_wrap">
		<div class="page-header">
			<h1 class="page_detail_title">{{page_title}}角色</h1>
		</div>
		<div class="row" style="margin-top:5px;">
		<div class="col-xs-12">
			<form  id="roleForm"  class="form-horizontal" (ngSubmit)="onSubmit()" novalidate="novalidate" [saBootstrapValidator]="validatorOptions">
				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">用户类型<sup>*</sup></label>
					<div class="col-sm-10">
						<div class="clearfix">
							<select class="form-control" name="userType" [(ngModel)]="userType" (change)="typeChange($event.target.value)" style="width: 100%">
								<option value="" selected>请选择</option>
								<option *ngFor="let item of userTypeList" [value]='item.id'>{{item.text}}</option>
							</select>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">角色名称<sup>*</sup></label>
					<div class="col-sm-10">
						<div class="clearfix">
							<input class="form-control"  [(ngModel)]='page.name' [attr.roleId]='roleId' name="name"  type="text" placeholder="角色名称" />
							<!--<input class="form-control" *ngIf='page_title === "编辑"' disabled="disabled" [(ngModel)]='page.name' name="name"  type="text" placeholder="资源类型" />-->
						</div>
					</div>
				</div>

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">角色标识<sup>*</sup></label>
					<div class="col-sm-10">
						<div class="clearfix">
							<input class="form-control" name="key" [(ngModel)]='page.key' type="text" placeholder="角色标识" />
						</div>
					</div>
				</div>

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">角色描述</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<input class="form-control" name="description" [(ngModel)]='page.description' type="text" placeholder="角色描述" />
						</div>
					</div>
				</div>
				<div class="form-group" style="display: flex">
					<label class="control-label col-sm-1 no-padding-right">新项目自动分配</label>
					<label class="checkbox-inline">
						<input class="checkbox style-0" style="visibility: visible" type="checkbox" name="autoAllotTop" id="autoAllotTop">
						<!-- <span>新项目自动分配</span> -->
					</label>
				</div>

				<div class="form-group" style="display: flex">
					<label class="control-label col-sm-1 no-padding-right">子公司自动分配</label>
					<label class="checkbox-inline">
						<input class="checkbox style-0" style="visibility: visible"  type="checkbox" name="autoAllotSon" id="autoAllotSon">
						<!-- <span>新项目自动分配</span> -->
					</label>
				</div>

				<div class="center">
					<button type="submit" class="btn btn-primary" *ngIf='page_title === "新增"' >添加</button>
					<button type="submit" class="btn btn-primary" *ngIf='page_title === "编辑"' >保存</button>
					<button type="button" (click)='goBack()' class="btn default">返回</button>
				</div>
			</form>
			<div class="hr hr-dotted"></div>
		</div>
	</div>
	</div>
</div>